package com.aurora.utils;

import cn.dev33.satoken.stp.StpUtil;
import com.aurora.model.dto.UserDetailsDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


/**
 * @author 刘俊 editor
 * 用户工具类
 */
@Component
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class UserUtils {



    public static UserDetailsDTO getUserDetailsDTO() {
        Integer loginId = StpUtil.getLoginIdAsInt();
        UserDetailsDTO userDetailsDTO = new UserDetailsDTO();
        userDetailsDTO.setUserInfoId(loginId);

        return userDetailsDTO;
    }


}
